package com.warom.sdg.model;

/**
 * 粮情数据实体类
 * 用于存储电缆温湿度数据
 */
public class GrainSituationEntity {
    
    private long id;
    
    // 电缆编号
    private int cableNo;
    
    // 电缆名称
    private String cableName;
    
    // 温度值
    private float temperature;
    
    // 湿度值
    private float humidity;
    
    // 时间戳（毫秒）
    private long timestamp;
    
    // 时间字符串，方便查询和显示
    private String timeString;
    
    // 设备ID，关联到设备表
    private long deviceId;
    
    // 备注
    private String remark;

    // 构造函数
    public GrainSituationEntity() {
    }
    
    public GrainSituationEntity(int cableNo, String cableName, float temperature, float humidity, 
                                long timestamp, String timeString, long deviceId) {
        this.cableNo = cableNo;
        this.cableName = cableName;
        this.temperature = temperature;
        this.humidity = humidity;
        this.timestamp = timestamp;
        this.timeString = timeString;
        this.deviceId = deviceId;
    }

    // Getters and Setters
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public int getCableNo() {
        return cableNo;
    }

    public void setCableNo(int cableNo) {
        this.cableNo = cableNo;
    }

    public String getCableName() {
        return cableName;
    }

    public void setCableName(String cableName) {
        this.cableName = cableName;
    }

    public float getTemperature() {
        return temperature;
    }

    public void setTemperature(float temperature) {
        this.temperature = temperature;
    }

    public float getHumidity() {
        return humidity;
    }

    public void setHumidity(float humidity) {
        this.humidity = humidity;
    }

    public long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }

    public String getTimeString() {
        return timeString;
    }

    public void setTimeString(String timeString) {
        this.timeString = timeString;
    }

    public long getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(long deviceId) {
        this.deviceId = deviceId;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return "GrainSituationEntity{" +
                "id=" + id +
                ", cableNo=" + cableNo +
                ", cableName='" + cableName + '\'' +
                ", temperature=" + temperature +
                ", humidity=" + humidity +
                ", timestamp=" + timestamp +
                ", timeString='" + timeString + '\'' +
                ", deviceId=" + deviceId +
                '}';
    }
} 